Customer Management Biz Api icon

Customer Management Biz Api

(0 reviews)

POST Customer

Create customer for FIXED

This operation creates a customer entity.

Key Design Decisions for CR Market
  • New B2C customers are in scope.
  • name field in the request is a combination of firstName + lastName + lastName2 from characteristics
  • Mulesoft is converting the values to upper case as per the validation of siebel.
  • No data validation is present in the Mulesoft. Possible values in the documentation are not final. Consumer should validate all the possible values based on the business requirement.
  • Error message from the backend system is captured in the error response.
  • The legacy system that consumes the creation of the customer must respect the values of the lists of values configured in the fields.
  • The customer creation web service will only allow the creation of 1 customer at a time.
  • The value for the "Identification number" field may be sent with or without hyphens (-), always respecting the minimum and maximum number of characters and other format validations.
  • The customer creation process will create an address record with the information provided, this record will be assigned as the main address. The system that consumes the web service must send the correct values from the province, canton, district and neighborhood value lists.
  • The system will return an error code and message in case there is a problem creating and associating the new address and/or contact record, but the customer creation will not be interrupted. In the case of error (error in address or contact), the creation of these records will be done manually by the end user.
  • Reprocessing of request is not possible if the customer entity creation is successful.-Refer Request and Response with Name CR-B2C-Contact Id(contactId), Row Id (id) and Address Id(addressId) are required to Create Agreement, settlementAccount and to create Order-amnistia value should be empty,when “idProofType = CEDULA FISICA” or PASAPORTE
Characteristic Sub-Resource Table for request for CR Market
NameTypeY/NDescription
characteristic.name="idProof"StringYidProof of customer. CEDULA JURIDICA and INSTITUCIONES AUTÓNOMAS are applicable for B2B. There are some rules depending on the identification type:
Possible Values:
- CEDULA FISICA
Validation Rule:
/^(\0[1-9])(\d{4})(\d{4})$/g
/^\0[1-9]-\d{4}-\d{4}\$/g;

- PASAPORTE
Validation Rule:
/^([A-Za-z0-9]{8,10}?)\$/g
/^([A-Za-z0-9]{8,10}?)\$/g

- CEDULA JURIDICA
Validation Rule:
/^(\d{1})(\d{3})(\d{6})\$/g
/^\d{1}-\d{3}-\d{6}\$/g

- INSTITUCIONES AUTÓNOMAS
Validation Rule:
/^(\d{1})-([0]{3})-(\d{6})\$/g
/^(\d{1})([0]{3})(\d{6})\$/g

- CEDULA RESIDENCIA
Validation Rule:
IF the field "amnistia" has the value "Y"

/^(\d{1})(\d{3})(RE\d{6})\$/g
/^(\d{1})-(\d{3})-(RE\d{6})\$/g

ELSE IF the field "amnistia" has the value “N”

/^(\d{1})(\d{3})(\d{8})\$/g
/^(\d{1})-(\d{3})-(\d{8})\$/g. Example
{
"name":"idProof",
"value":"01-4498-5920"
}
characteristic.name="idProofType"StringYId Proof Type of customer. CEDULA JURIDICA and INSTITUCIONES AUTÓNOMAS are applicable for B2B. Accepts possible values in CAPITAL only!
Possible Values:
- CEDULA FISICA
- PASAPORTE
- CEDULA JURIDICA
- INSTITUCIONES AUTÓNOMAS
- CEDULA RESIDENCIA. Example
{
"name":"idProofType",
"value":"CEDULA FISICA"
}
characteristic.name="amnistia"StringNamnistia. Boolean Y or N. Example
{
"name":"amnistia",
"value":"N"
}
characteristic.name="fraudCategory"StringNFraud category. Fraud clasification field; possible values are:
▪ Oro
▪ Plata
▪ Bronce. Example
{
"name":"fraudCategory",
"value":"Oro"
}
characteristic.name="customerType"StringYCustomer Type. only "RESIDENCIAL" is applicable for B2C. Accepts possible values in capital and half-words , if the alphabets are in consecutive order of those possible values.
Possible Values:
▪ RESIDENCIAL
▪ MICROEMPRESA
▪ PEQUEÑA EMPRESA
▪ PROGRAMA HOGARES CONECTADOS
▪ MEDIANA EMPRESA
▪ GRAN EMPRESA
▪ EMPLEADO
▪ CORPORATIVO
▪ HOTEL. Example
{
"name":"customerType",
"value":"GRAN EMPRESA"
}
characteristic.name="customerCategory"StringNCustomer Category. It is mapped from request - characteristic.name='customerCategory'
Accepts possible values in CAPITAL only!
Possible Values
▪ CLIENTE VIP
▪ COMERCIAL
▪ EMPRESARIAL
▪ PYMES
▪ CLIENTE LEAL
▪ PHC QUINTIL 1
▪ PHC QUINTIL 2
▪ PHC QUINTIL 3
▪ CLIENTE POTENCIAL
▪ CLIENTE BASICO. Example
{
"name":"customerCategory",
"value":"CLIENTE VIP"
}
characteristic.name="role"StringYRole of Customer. Accepts possible values in CAPITAL only!
Possible Values:
▪ ABOGADO DE LA EMPRESA
▪ ADMINISTRADOR
▪ DUEÑO
▪ ESPOSA
▪ ESPOSO
▪ JEFE DE SISTEMAS
▪ COBRO
▪ ENCARGADO OPERACIONES
▪ ENCARGADO TECNICO
▪ GERENTE FINANCIERO. Example:
{
"name":"role",
"value":"DUEÑO"
}
characteristic.name="firstName"StringYFirst name. Example
{
"name":"firstName",
"value":"GILBERTO"
}
characteristic.name="lastName"StringYLast name. Example
{
"name":"lastName",
"value":"ALMEMAN "
}
characteristic.name="lastName2"StringNSecond last name. Example
{
"name":"lastName2",
"value":"TOSTY"
}
characteristic.name="gender"StringYGender of the customer. Accepts possible values in upperCase or initial Substring in upperCase.
Possible Values:
• MASCULINO
• FEMENINO
• INDEFINIDO Example
{
"name":"gender",
"value":"MASCULINO"
}
characteristic.name="lob"StringMLob. Example
{
"name":"lob",
"value":"FIXED"
}
characteristic.name="commercialName"StringY/NCommercial Name. Applicable for B2B. Mandatory field when customer type as below:
▪ MICROEMPRESA
▪ PEQUEÑA EMPRESA
▪ MEDIANA EMPRESA
▪ GRAN EMPRESA
▪ INMOBILIARIO
Note: Do not pass this field when customerType is not as above else bss will throw error!
Possible Values:
▪ MICROEMPRESA
▪ PEQUEÑA EMPRESA
▪ MEDIANA EMPRESA
▪ GRAN EMPRESA
▪ INMOBILIARIO. Example
{
"name":"commercialName",
"value":""
}
characteristic.name="hotelType"StringY/NHotel Type. Applicable for B2B. Possible Values: AEROPUERTO, PENSION, APARTOTEL, EJECUTIVO, CASINO, CLUB, DE PASO, MONTAÑA, VACACIONAL. Example
{
"name":"hotelType",
"value":"AEROPUERTO"
}
characteristic.name="hotelChain"StringY/NHotel Chain. Applicable for B2B. Possible Values: AM RESORT, BARCELO HOTELS & RESORT, C.H.E GROUP PLC, ENJOY HOTELS, ESPLENDOR, INTERCONTINETAL HOTELS GROUP, SOL MELIA, STARWOOD HOTELS & RESORT WORLD, BEST WESTERN INTERNATIONAL, CARLSON REZINDOR HOTEL GROUP, CARLSON HOSPITALITY WORLDWIDE, CHOICE HOTELS INTERNACIONAL, FIESTA HOTEL GROUP, FOUR SEASONS HOTELS & RESORTS, GLOBAL HYATT CORP, ACOMETIDA INSTALADA, AEREA EXPUESTA, DUCTO CON PIOLA, DUCTO SIN PIOLA ,HILTONS HOTELS CORP, HOSPITALITY INTERNATIONAL, MARRIOT INTERNACIONA,L NINGUNA, OCCIDENTALS HOTELS, RIU HOTELS, WYNDHAM WORLDWIDE. Example
{
"name":"hotelChain",
"value":"AM RESORT"
}
characteristic.name="district"StringYDistrict in Customer address. Example
{
"name":"district",
"value":"PUNTARENAS"
}
Characteristic Sub-Resource Table for response for CR Market
NameTypeY/NDescription
characteristic.name="addressId"StringYCustomer address id. Example
{
"name":"addressId",
"value":"1-2F741ZW"
}
characteristic.name="contactId"StringYCustomer contact id. Example
{
"name":"contactId",
"value":"1-2F741ZY"
}
Error Scenarios examples:

Reason: when name is missing

    {
  "errors": [
    {
      "code": 400,
      "message": "APIKIT:BAD_REQUEST",
      "description": "required key [name] not found"
    }
  ]
}

Reason: when email characteristic.emailAddress value is invalid

    {
  "errors": [
    {
      "code": 400,
      "message": "Correo invalido(SBL-EXL-00151)(SBL-EXL-00151)",
      "description": "RowId: null,contactId: null,addressId: null"
    }
  ]
}

Reason: when address characteristic.city is missing

    {
  "errors": [
    {
      "code": 400,
      "message": "VALIDATION_CREATECUSTOMER:FAILED",
      "description": "City is mandatory"
    }
  ]
}

Reason: when address characteristic.stateOrProvince is missing

{

"errors": [

{

"code": 400,

"message": "VALIDATION_CREATECUSTOMER:FAILED",

"description": "State or province is mandatory"

}

]

}

Reason: when address characteristic.street1 is missing

    {
  "errors": [
    {
      "code": 400,
      "message": "VALIDATION_CREATECUSTOMER:FAILED",
      "description": "Street1 is mandatory"
    }
  ]
}

Reason: when characteristic.idProof is missing

{
  "errors": [
    {
      "code": 400,
      "message": "VALIDATION_CREATECUSTOMER:FAILED",
      "description": "IdProof is mandatory"
    }
  ]
}

Reason : when characteristic.idProofType value is invalid

    {
  "errors": [
    {
      "code": 400,
      "message": "El valor del campo Location Type del business component Account no coincide con ningún valor de la lista de selección enlazada Training Location Type Picklist.(SBL-DAT-00225)",
      "description": "RowId: null,contactId: null,addressId: null"
    }
  ]
}

Emarsys POST Customer

Key Points:

  1. Its implemented for PR, JM, PA, CR Markets.
  2. ChannelId headers should be pass as "ECOM"
  3. targetSystem headers should be pass as "emarsys"

Request body:

{
    "contactMedium": [
        {
            "preferred": true,
            "characteristic": {
                "emailAddress": "kadambini.chandel@capgemini.com"
            }
        }
    ]
}

Response Body:

{
    "id": 671517439
}

POST Customer for PA:

Request body:

{
    "name": "TEST 25Feb2022",
    "contactMedium": [
        {
            "mediumType": "Address",
            "preferred": false,
            "characteristic": {
                "street1": "512",
                "street2": "Boulevard CostaDeleste",
                "city": "PHCountryClub CostaDelEste",
                "stateOrProvince": "Juan Dias",
                "postCode": "00000",
                "country": "Panama"
            }
        },
        {
            "mediumType": "Telephone",
            "preferred": true,
            "characteristic": {
                "phoneNumber": "1234566789",
                "contactType": "mobile/home"
            }
        },
        {
            "mediumType": "Mobile",
            "preferred": true,
            "characteristic": {
                "phoneNumber": "1234566789",
                "contactType": "mobile1/mobile2"
            }
        },
        {
            "mediumType": "Email",
            "preferred": false,
            "characteristic": {
                "emailAddress": "donald.slicon@silicon.com",
                "contactType": "email"
            }
        }
    ],
    "characteristic": [
        {
            "name": "dateOfBirth",
            "value": "2000-06-12"
        },
        {
            "name": "title",
            "value": "Mr"
        },
        {
            "name": "gender",
            "value": "M"
        },
        {
            "name": "type",
            "value": "RES"
        },
        {
            "name": "companyCode",
            "value": "CWP"
        },
        {
            "name": "idProof",
            "valueType": "C",
            "value": "8-997-999"
        },
        {
            "name": "sourceEPC",
            "value": "LIBERATE"
        },
        {
            "name": "nationality",
            "value": "PANA"
        },
        {
            "name": "employmentStatus",
            "value": "N"
        }
    ]
}

Response Body:

{
    "id": "3391803",
    "account": [
        {
            "id": "339180300000"
        }
    ]
}

Reviews